import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import Login from '../components/login/Login.vue'
import Index from '../components/Index.vue'
import Home from '../components/home/Home.vue';
import Discuss from '../components/home/Discuss.vue'
// import { component } from 'vue/types/umd';
import Welcome from '../components/index/Welcome.vue'
import User from '../components/index/User.vue'
import Password from '../components/index/Password.vue'
import Person from '../components/index/Person.vue'
import Business from '../components/index/Business.vue'
import Uregister from '../components/register/Uregister.vue'
import Bregister from '../components/register/Bregister.vue'
import Pindex from '../components/personindex/Pindex.vue'
import Pwelcome from '../components/personindex/Pwelcome.vue'
import Ppassword from '../components/personindex/Ppassword.vue'
import Puser from '../components/personindex/Puser.vue'
import Pbusiness from '../components/personindex/Pbusiness.vue'
import Bindex from '../components/businessindex/Bindex.vue'
import Bwelcome from '../components/businessindex/Bwelcome.vue'
import Bpassword from '../components/businessindex/Bpassword.vue'
import Bbusiness from '../components/businessindex/Bbusiness.vue'
import Jobmanage from '../components/businessindex/Jobmanage.vue'
import Recruitsend from '../components/businessindex/Recruitsend.vue'
import Leavemessage from '../components/home/Leavemessage.vue'
import Usercenter from '../components/userprofile/Usercenter.vue'
import Write from '../components/home/Write.vue'
import Album from '../components/userprofile/Album.vue'
import Slideshow from '../components/index/Slideshow.vue'
import Resume from '../components/personindex/Resume.vue'
import Test from '../components/home/test.vue'
import Details from '../components/home/Details.vue'
import Audit from '../components/index/Audit.vue'
Vue.use(VueRouter)

const routes = [{
        path: '/test',
        name: 'Test',
        component: Test,

    },
    {
        path: '/',
        name: 'Home',
        component: Home,

    },
    {
        path: '/details',
        name: 'Details',
        component: Details,
    },
    {
        path: '/discuss',
        name: 'Discuss',
        component: Discuss,
    },
    {
        path: '/album',
        name: 'Album',
        component: Album,
    },
    {
        path: '/usercenter',
        name: 'Usercenter',
        component: Usercenter
    },
    {
        path: '/leavemessage',
        name: 'Leavemessage',
        component: Leavemessage
    },
    {
        path: '/write',
        name: 'Write',
        component: Write
    },
    {
        path: '/login',
        name: 'Login',
        component: Login,

    },
    {
        path: '/uregister',
        name: 'Uregister',
        component: Uregister,

    },
    {
        path: '/bregister',
        name: 'Bregister',
        component: Bregister,

    },
    {
        path: '/pindex',
        name: 'Pindex',
        component: Pindex,
        redirect: '/pwelcome',
        children: [
            { path: '/pwelcome', component: Pwelcome },
            { path: '/ppassword', component: Ppassword },
            { path: '/puser', component: Puser },
            { path: '/pbusiness', component: Pbusiness },
            { path: '/resume', component: Resume },
        ]
    },
    {
        path: '/bindex',
        name: 'Bindex',
        component: Bindex,
        redirect: '/bwelcome',
        children: [
            { path: '/bwelcome', component: Bwelcome },
            { path: '/bpassword', component: Bpassword },
            { path: '/bbusiness', component: Bbusiness },
            { path: '/jobmanage', component: Jobmanage },
            { path: '/recruitsend', component: Recruitsend },
        ]
    },
    {
        path: '/index',
        name: 'Index',
        component: Index,
        redirect: '/welcome',
        children: [
            { path: '/welcome', component: Welcome },
            { path: '/user', component: User },
            { path: '/password', component: Password },
            { path: '/person', component: Person },
            { path: '/business', component: Business },
            { path: '/slideshow', component: Slideshow },
            { path: '/audit', component: Audit },
        ]
    }

    // {
    //   path: '/',
    //   name: 'Home',
    //   component: Home
    // },
    // {
    //   path: '/about',
    //   name: 'About',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    routes
})

export default router